package com.ks.order.controller;

import com.ks.common.model.response.RespBaseDto;
import com.ks.order.model.request.ReqCreateorderDto;
import com.ks.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order/")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @PostMapping(value = "creation")
    public RespBaseDto createOrder(@RequestBody ReqCreateorderDto request) {
        orderService.createOrder(request);
        return RespBaseDto.getInstance().success();
    }


}
